package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IMyCenterFragmentModel;
import com.wgts.wgts.mvp.model.IPutForwardActivityModel;
import com.wgts.wgts.mvp.model.imp.MyCenterFragmentModel;
import com.wgts.wgts.mvp.model.imp.PutForwardActivityModel;
import com.wgts.wgts.mvp.presenter.IPutForwardActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.PutForwardActivityPresenter;
import com.wgts.wgts.mvp.view.IPutForwardActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class PutForwardActivityModule {

    private IPutForwardActivityView view;

    public PutForwardActivityModule(IPutForwardActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IPutForwardActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IPutForwardActivityModel provideModel(NetService netService){
        return new PutForwardActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IMyCenterFragmentModel provideCenterModel(NetService netService){
        return new MyCenterFragmentModel(netService);
    }

    @ActivityScope
    @Provides
    public IPutForwardActivityPresenter providePersenter(IPutForwardActivityView view, IPutForwardActivityModel model, IMyCenterFragmentModel centerFragmentModel){
        return new PutForwardActivityPresenter(model, view, centerFragmentModel);
    }
}
